#ifndef ROV_CONFIG_H
#define ROV_CONFIG_H

#include <unistd.h>
#include <stdint.h>
#include <stdio.h>

#include <QDebug>

#define my_def_desktop_ip "192.168.2.157"
#define my_def_video_port 4466
#define my_def_yg_lock        2
#define my_def_yg_unlock      0
struct CONFIGcx
{
    uint16_t head;
    char key[16];

    // ip_address
    uint32_t desktop_ip;
    char desktop_str[16];

    uint32_t cat_ip;
    char cat_str[16];

    // channel
    uint16_t port_channel_0;
    uint16_t port_channel_1;
    uint16_t port_channel_2;
    uint16_t port_channel_3;
    uint16_t port_channel_4;
    uint16_t port_channel_5;
    uint16_t port_channel_6;
    uint16_t port_channel_7;

    void print(char* info=NULL)
    {
        if (info != NULL) printf("[%s]", info);
//        char str[1024];
//        sprintf(str, "key:%s Desktop IP:%s NX IP:%s ch0:%u ch1:%u ch2:%u ch3:%u ch4:%u ch5:%u ch6:%u ch7:%u\n",
//            this->key, this->desktop_str, this->nx_str,
//            this->port_channel_0, this->port_channel_1, this->port_channel_2, this->port_channel_3,
//            this->port_channel_4, this->port_channel_5, this->port_channel_6, this->port_channel_7);
//        qDebug() << str;
    }
};

#endif // ROV_CONFIG_H
